#include <iostream>
#include<queue>
using namespace std;


class compare
{
public :
    bool  operator()(const int& a, const int& b)
    {
        return a > b;   
   }
};
int main()
{
    ios::sync_with_stdio(false); 
    cin.tie(0); cout.tie(0);     
    //如果需要提示信息的话就需要使用cout<<endl 和cout.flush();
    // 手动的刷新缓冲区
   // cout << "hello world";//我并没有刷新缓冲区
   // int x; cin >> x;
    auto time1 = clock(); 
    priority_queue<int, vector<int>,compare>q;  //默认是大堆
    srand((unsigned int)time(nullptr));
    for (int i = 0; i < 10; i++)
    {
        int x = rand() % 100;
        q.push(x);  
    }
    while (q.size())
    {
        auto x = q.top();
        q.pop();
        cout << x << ' ';
    }
    auto time2 = clock();

    cout <<endl<< time2 - time1 << endl;

    return 0;
}
